<template>

  <el-main style="background-color:#fafafa">
    <h1> IntroMe</h1>

    <el-row type="flex" justify="center" style="z-index: 1">
      <el-col :span="14" :xs="24">
        <mavon-editor
            class="md"
            :value="webDataString"
            :editable="false"
            default-open="preview"
            :ishljs="true"
            :toolbarsFlag="false"
            :html="true"
            :subfield="false"
            :xssOptions="{
                whiteList: {
                    iframe: ['src', 'height', 'width', 'scrolling','allowfullscreen','frameborder'],
                    div: ['style', 'height', 'width', 'align'],
                    img: ['src', 'height', 'width','style', 'align']
                  }
              }"
        />

        <!--  仅用作展示可以设置props:
        toolbarsFlag: false ,
        subfield: false,
        defaultOpen: "preview"-->
      </el-col>
    </el-row>

  </el-main>

</template>

<script>
import {homeGet} from "@/api/home";

export default {
  data() {
    return{
      webDataString: ''
    }
  },
  created() {
    homeGet("1").then(
      res=>{
        this.webDataString = res.data.homeHtml
      }
    )

  }
};
</script>
